﻿Public Class DeliveryAddress
	Inherits vCardItem

	''' <value>True</value>
	Public Property IsWork As Boolean = True

	''' <value>False</value>
	Public Property IsDomestic As Boolean = False

	''' <value>True</value>
	Public Property IsInternational As Boolean = True

	''' <value>True</value>
	Public Property IsPostal As Boolean = True

	''' <value>True</value>
	Public Property IsParcel As Boolean = True

	''' <value>False</value>
	Public Property IsHome As Boolean = False

	Public Property PostOfficeAddress As String
	Public Property ExtendedAddress As String
	Public Property Street As String
	Public Property Locatlity As String
	Public Property Region As String
	Public Property PostalCode As String
	Public Property Country As String

	Protected Overrides Property vProperty As String
		Get
			Return "ADR"
		End Get
		Set(value As String)
		End Set
	End Property

	Protected Overrides Property vValues As System.Collections.Generic.List(Of String)
		Get
			Dim myValues As New List(Of String)

			If IsDomestic Then myValues.Add("DOM")
			If IsInternational Then myValues.Add("INTL")
			If IsPostal Then myValues.Add("POSTAL")
			If IsParcel Then myValues.Add("PARCEL")
			If IsHome Then myValues.Add("HOME")
			If IsWork Then myValues.Add("WORK")

			Return myValues
		End Get
		Set(value As System.Collections.Generic.List(Of String))
		End Set
	End Property

	Protected Overrides Property vParameters As System.Collections.Generic.List(Of String)
		Get
			Dim myParameters As New List(Of String)

			myParameters.Add(PostOfficeAddress)
			myParameters.Add(ExtendedAddress)
			myParameters.Add(Street)
			myParameters.Add(Locatlity)
			myParameters.Add(Region)
			myParameters.Add(PostalCode)
			myParameters.Add(Country)

			Return myParameters
		End Get
		Set(value As System.Collections.Generic.List(Of String))
		End Set
	End Property

	Public Sub New(PostOfficeAddress As String, ExtendedAddress As String, Street As String, Locatlity As String, Region As String, PostalCode As String, Country As String)
		Me.PostOfficeAddress = PostOfficeAddress
		Me.ExtendedAddress = ExtendedAddress
		Me.Street = Street
		Me.Locatlity = Locatlity
		Me.Region = Region
		Me.PostalCode = PostalCode
		Me.Country = Country
	End Sub
End Class
